Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tickless implementation 2 #5031

Closed
wants to merge 5 commits into from
Closed

Tickless implementation 2 #5031

wants to merge 5 commits into from

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Sep 5, 2017

This patch is another implementation of tickless which preserves interrupt latency by adding the additional cmsis_os2 function osKernelCanSleep() along with moving code out of the critical section.

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 5, 2017

Alternative to #4991

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 6, 2017

  • Removed tickless support for NUCLEO_F429ZI and MAX32625MBED
  • Rebased to master
  • Remvoed space savings for stm32f07
  • moved mbed_rtx_idle.cpp behind TARGET_CORTEX since restructure PR was merged

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 6, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented Sep 7, 2017

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1234

Build failed!

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 7, 2017

/morph test

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 7, 2017

+1 for if kernel can sleep. What is the preference between those 2 implementations ? as both of them are currently opened.

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 7, 2017

#4991 is the preference since this one requires an extension to the RTX API.

@mbed-bot
Copy link

mbed-bot commented Sep 7, 2017

Result: ABORTED

Your command has finished executing! Here's what you wrote!

/morph test

c1728p9 and others added 5 commits September 7, 2017 21:34
Add support for tickless by replacing RTX's SysTick timer code with
with code which uses an mbed timer along with suspending and
resuming the kernel in the idle loop. Tickless is enabled on a
per-target basis by defining the macro MBED_TICKLESS.
Some Cortex-M0 devices, such as the nrf51, don't have the SysTick.
Instead, these targets use a software interrupt to simulate SysTick.
Add the hooks in the tickless code to support these devices. Targets
which do not have SysTick should now define NO_SYSTICK in targets.json
and implement mbed_get_m0_tick_irqn to add os suport.

This patch also removes os tick handling from the existing devices
(nrf51) since this is now handled in common code.
Decrease the interrupt stack from 2k down to 1k so there is enough
ram to build all the tests with tickless enabled. In general, targets
should not need an interrupt stack greater than 1k with mbed-os.
Enable tickless on nrf5x devices and the NCS36510.
Add the function osKernelCanSleep which indicates if it is safe to
call sleep (while the kernel is suspended). This patch also replaces
the svcRtx* calls with os* calls since they no longer need to be
called from a critical section.
@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 19, 2017

Closing this out to remove some of the clutter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants